gccfandomcom_ja-20200214-history
Struct loop
このページを編集する際は，編集に関する方針に従ってください． 概要 *gcc-4.1.0/gcc/cfgloop.hにて定義 * 実装 60 /* Structure to hold information for each natural loop. */ 61 struct loop 62 { 63 /* Index into loops array. */ 64 int num; 65 66 /* Basic block of loop header. */ 67 basic_block header; 68 69 /* Basic block of loop latch. */ 70 basic_block latch; 71 72 /* For loop unrolling/peeling decision. */ 73 struct lpt_decision lpt_decision; 74 75 /* Number of loop insns. */ 76 unsigned ninsns; 77 78 /* Average number of executed insns per iteration. */ 79 unsigned av_ninsns; 80 81 /* The first block in the loop. This is not necessarily the same as 82 the loop header. */ 83 basic_block first; 84 85 /* The last block in the loop. This is not necessarily the same as 86 the loop latch. */ 87 basic_block last; 88 89 /* Number of blocks contained within the loop. */ 90 unsigned num_nodes; 91 92 /* The loop nesting depth. */ 93 int depth; 94 95 /* Superloops of the loop. */ 96 struct loop **pred; 97 98 /* The height of the loop (enclosed loop levels) within the loop 99 hierarchy tree. */ 100 int level; 101 102 /* The outer (parent) loop or NULL if outermost loop. */ 103 struct loop *outer; 104 105 /* The first inner (child) loop or NULL if innermost loop. */ 106 struct loop *inner; 107 108 /* Link to the next (sibling) loop. */ 109 struct loop *next; 110 111 /* Loop that is copy of this loop. */ 112 struct loop *copy; 113 114 /* Nonzero if the loop is invalid (e.g., contains setjmp.). */ 115 int invalid; 116 117 /* Auxiliary info specific to a pass. */ 118 void *aux; 119 120 /* The following are currently used by loop.c but they are likely to 121 disappear when loop.c is replaced and removed. */ 122 123 /* The NOTE_INSN_LOOP_BEG. */ 124 rtx start; 125 126 /* The NOTE_INSN_LOOP_END. */ 127 rtx end; 128 129 /* For a rotated loop that is entered near the bottom, 130 this is the label at the top. Otherwise it is zero. */ 131 rtx top; 132 133 /* Place in the loop where control enters. */ 134 rtx scan_start; 135 136 /* The position where to sink insns out of the loop. */ 137 rtx sink; 138 139 /* List of all LABEL_REFs which refer to code labels outside the 140 loop. Used by routines that need to know all loop exits, such as 141 final_biv_value and final_giv_value. 142 143 This does not include loop exits due to return instructions. 144 This is because all bivs and givs are pseudos, and hence must be 145 dead after a return, so the presence of a return does not affect 146 any of the optimizations that use this info. It is simpler to 147 just not include return instructions on this list. */ 148 rtx exit_labels; 149 150 /* The number of LABEL_REFs on exit_labels for this loop and all 151 loops nested inside it. */ 152 int exit_count; 153 154 /* The probable number of times the loop is executed at runtime. 155 This is an INTEGER_CST or an expression containing symbolic 156 names. Don't access this field directly: 157 number_of_iterations_in_loop computes and caches the computed 158 information in this field. */ 159 tree nb_iterations; 160 161 /* An INTEGER_CST estimation of the number of iterations. NULL_TREE 162 if there is no estimation. */ 163 tree estimated_nb_iterations; 164 165 /* Upper bound on number of iterations of a loop. */ 166 struct nb_iter_bound *bounds; 167 168 /* If not NULL, loop has just single exit edge stored here (edges to the 169 EXIT_BLOCK_PTR do not count. */ 170 edge single_exit; 171 172 /* True when the loop does not carry data dependences, and 173 consequently the iterations can be executed in any order. False 174 when the loop carries data dependences, or when the property is 175 not decidable. */ 176 bool parallel_p; 177 };